<!-- 玻璃按钮 -->
<template>
  <div class="container">
    <div class="btn"><a href="a">read more1</a></div>
    <div class="btn"><a href="a">read more2</a></div>
    <div class="btn"><a href="a">read more3</a></div>
  </div>
</template>

<script setup>
  // 这里可以添加逻辑代码，但在这个例子中我们主要关注样式
</script>

<style scoped lang="scss">
  .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    font-family: Roboto, sans-serif;
    background: linear-gradient(to bottom, #5d326c, #350048);
    border-radius: calc(var(--custom-radius) / 2 + 2px) !important;

    .btn {
      position: relative;
      top: 0;
      left: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 250px;
      height: 36px;
      margin: 0;
    }

    a {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      padding: 10px;
      overflow: hidden;
      font-weight: 400;
      color: #fff;
      text-decoration: none;
      letter-spacing: 1px;
      background: rgb(255 255 255 / 5%);
      backdrop-filter: blur(15px);
      border-bottom: 1px solid rgb(255 255 255 / 1%);
      border-radius: 30px;
      box-shadow: 0 15px 15px rgb(0 0 0 / 30%);
      transition: 0.5s;
    }

    a::before {
      position: absolute;
      top: 0;
      left: 0;
      width: 50%;
      height: 100%;
      content: '';
      background: linear-gradient(to left, rgb(255 255 255 / 15%), transparent) !important;
      filter: blur(0);
      transition: 0.5s;
      transform: skew(45deg) translate(0);
    }
  }

  .btn:hover a {
    letter-spacing: 3px;
  }

  .btn:hover a::before {
    transform: skewX(45deg) translate(200px);
  }

  .container .btn::before {
    position: absolute;
    bottom: -27px;
    left: 50%;
    width: 30px;
    height: 10px;
    content: '';
    background: #f00;
    transition: 0.5s;
    transition-delay: 0.5s;
    transform: translateX(-50%);
  }

  .btn:hover::before {
    bottom: -20px;
    width: 80%;
    height: 50%;
    border-radius: 30px;
  }

  .btn::after {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 30px;
    height: 7px;
    content: '';
    background: #f00;
    border-radius: 10px;
    transition: 0.5s;
    transition-delay: 0.5s;
    transform: translateX(-50%);
  }

  .btn:hover::after {
    top: 0;
    width: 80%;
    height: 50%;
    border-radius: 30px;
  }

  .container .btn:nth-child(1)::before,
  .container .btn:nth-child(1)::after {
    background: #ff1f71;
    box-shadow:
      0 0 5px #ff1f71,
      0 0 15px #ff1f71,
      0 0 30px #ff1f71,
      0 0 60px #ff1f71;
  }

  .container .btn:nth-child(2)::before,
  .container .btn:nth-child(2)::after {
    background: #1eff45;
    box-shadow:
      0 0 5px #1eff45,
      0 0 15px #1eff45,
      0 0 30px #1eff45,
      0 0 60px #1eff45;
  }

  .container .btn:nth-child(3)::before,
  .container .btn:nth-child(3)::after {
    background: #2db2ff;
    box-shadow:
      0 0 5px #2db2ff,
      0 0 15px #2db2ff,
      0 0 30px #2db2ff,
      0 0 60px #2db2ff;
  }
</style>
